1. Technical Field
The present invention relates generally to an improved data processing system and, in particular, to a method and system for accessing objects in a data store. Still more particularly, the present invention relates to a method, apparatus, and computer instructions for splitting data of a request into multiple fields and merging multiple column data of a data store into a response message at run time from generic request and response messages without client knowledge of the data store structure.
2. Description of Related Art
With the rise of the Internet, the ease of information exchange is pertinent to any application that facilitates data transactions. Particularly, in a World Wide Web environment, where service providers and consumers meet to conduct business, the efficiency of storing and retrieving business data is important to the success of business transactions. Various solutions have been developed to facilitate information exchange and storage of business data.
One solution for data exchange uses an XML Extender. An XML Extender is a component of DB2 Universal Database, a product available from International Business Machine Corporation. XML Extender makes use of extensible markup language (XML), a markup language available from the World Wide Web Consortium (W3C), to generate requests for business objects in a data store. XML allows users to flexibly define the structure of a query using a set of XML schemas. XML schemas define a set of elements that an XML message should include in order to exchange information with a data store. Thus, an XML message must adhere to the XML schemas in order to interact with the data store.
However, the XML Extender requires a client application to have knowledge of the specific data store, for example, a table name and table column name, in order to send an XML query message. In addition, the client application is required to have the ability to issue a structured query language (SQL) statement to be executed against the data store. SQL is an industry standard for constructing database queries. Furthermore, the amount of code required to support the variety of actions performed on the object is large since each action in the XML query may be different.
Often, a data provider maintains information in a data store that is accessible by a wide variety of clients. For various reasons, an information provider may desire to conceal a database or data store data structure from serviced clients. However, in doing so, the types of data operations the clients may perform on the data is limited. For example, a client attempting to insert data into a particular column of a database may inadvertently attempt to insert an amount of data that exceeds a column width or character length. In such a situation, an error may be generated or the insert data may be truncated. In other situations, it may be desirable to provide client access to data of multiple database columns, or multiple columns of multiple database tables, as a single data column. However, an XML Extender, for example, requires exposing the database structure to the client application.
Therefore, it would be advantageous to have a generic set of XML schemas and messages that are not data store specific. In addition, it would be advantageous to have a set of generic XML schemas that facilitate generation of SQL statements from an XML query that does not include a SQL statement. Moreover, it would be advantageous to provide a method of splitting data into multiple columns from a request and merging data from multiple columns of a data store into a response at run time.